Blog

Installing the Code Deploy Agent on Debian, here’s how to do it

aws-codedeploy

When using a Debian environment with CodeDeploy , you too will have come up against a dependency that is difficult to satisfy: Ruby 2.0.

Since this version was deprecated on February 24, 2016, this version can be installed by compiling the source code or using an RVM.

Using RVM is a good choice and the installation is very simple:
Here’s how to install dependencies:

sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev automake libtool bison subversion nodejs libncurses-dev

Here’s how to install RVM and Ruby:

gpg –keyserver hkp://keys.gnupg.net –recv-keys D39DC0E3
curl -sSL https://get.rvm.io | bash -s stable
source /etc/profile.d/rvm.sh
RVM Requirements
RVM list known (check if there is version 2.0.02)
RVM install 2.0.0
RVM use 2.0.0 –default

Here’s how to install the “OpenSSL” gem:

gem install openssl

Once you’ve done this, you’ll be able to install the agent’s DEB package downloaded directly from an Amazon bucket (guide).

At this point, if everything was successful, you will only have to check that the agent is started but, as often happens, the DEB does not find Ruby 2.0 and, since this dependency is not satisfied, the installation fails. Even if you try to compile the agent, this fundamental dependency doesn’t seem to be respected, even though it actually is.

To solve this problem, developer
Panayiotis Thomakos
, developed a fork from the agent’s source and created a gem.

To install it, all you need is a simple:

sudo gem install aws-codedeploy-agent
sudo service codedeploy-agent start

Yes, you can also install the latest version of Ruby without 2.0.

Easy, isn’t it?

This solution has been recognized as working by Amazon Web Services Support in an exchange within an issue, but it should be noted that the official documentation does not list Debian as a supported system and that the gem mentioned above may not be updated by the developer unlike the continuous updates that we record on the agent.

AWS Support CodeDeploy

 

1
RVM Ruby 2.0

2
RVM Ruby List

Author

ugo

Leave a comment

Your email address will not be published. Required fields are marked *

This site is registered on wpml.org as a development site. Switch to a production site key to remove this banner.